'''
① 打印直角三角形
② 把直角三角形中的小星星替换为9x9乘法表公式
'''

# i  = 0
# while i < 9:
#     j = 0
#     while j < i + 1:
#         print(f"{j+1}*{i+1}={(j+1)*(i+1)}", end="  ")
#         j += 1
#     print()
#     i += 1

i  = 1
while i <= 9:
    j = 1
    while j <= i:
        print(f"{j}*{i}={j*i}", end="  ")
        j += 1
    print()
    i += 1

# # 定义外层循环计数器
# i = 1
# # 定义外层循环条件
# while i <= 9:
#     # 定义内层循环计数器
#     j = 1
#     # 定义内层循环条件
#     while j <= i:
#         print(f'{j}x{i}={i*j}', end='  ')
#         # 更新计数器的值
#         j += 1
#     # 输出换行符
#     print('')
#     # 更新外层计数器的值
#     i += 1